﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Common/Master/PopupDiv.Master"
    AutoEventWireup="true" CodeBehind="Edit.aspx.cs" Inherits="Jzy.Web.WorkFlow.Design.Node.Edit" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

    <script type="text/javascript" src="../../Common/Js/tab2.js"></script>
    <script type="text/javascript" src="../../Common/Js/workflow.js"></script>
    <style type="text/css">
       
        .style1
        {
            height: 30px;
            text-align: right;
            padding-right: 5px;
            width: 85px;
        }
        .style2
        {
        }
        
        .style3
        {
        	margin-left: 10px; margin-right: 10px;
            height: 100%; display:none;
        }
        .style4{	margin-left:20px;     }
        .style5{ margin-left:32px;}
       
    </style>
    
    <script type="text/javascript">
        function chk_click(sender, drp)
        {
            if (sender.checked)
            {
                document.getElementById(drp).disabled = "";
            }
            else
            {
                document.getElementById(drp).disabled = "disabled";
            }
        }

        function type_click(flag)
        {
            var ctls = ['<%=RoleNames.ClientID %>', '<%=hidRoleIDs.ClientID %>', '<%=lnkSelectRole.ClientID %>', '<%=UserNames.ClientID %>', '<%=hidUserIDs.ClientID %>', '<%=lnkSelectUser.ClientID %>', '<%=txtDefaultUserName.ClientID %>', '<%=hidDefaultUserID.ClientID %>', '<%=lnkSelectDefaultUser.ClientID %>'];
            var result = "";            
            if (flag == 2)
            {
                result = "disabled";
            }
            for (var i = 0; i < ctls.length; i++)
            {
                document.getElementById(ctls[i]).disabled = result;
            }
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div style="height:10px; line-height:10px;"></div>
    <div id="top_daohang" class="tab2" style="margin-left: 10px; margin-right: 10px;">
        <ul>
            <asp:Repeater ID="rpt" runat="server" EnableViewState="false">
                <ItemTemplate>
                    <li>
                        <div class="menu_l">
                        </div>
                        <div class="menu_r">
                        </div>
                        <a id='lnk_<%#Eval("ID") %>' onclick='setFocus(this)'>
                            <%#Eval("Name") %></a> </li>
                </ItemTemplate>
            </asp:Repeater>
        </ul>
    </div>
    <asp:Panel ID="pnlMain" runat="server" style="margin-bottom:10px; height:260px;">    
    <div id='div0' class="tab2_content style3">
        <table cellpadding="0" cellspacing="0" border="0" width="100%">
            <tr>
                <td class="style1">
                    <asp:Literal ID="Literal1" runat="server" Text="节点名称："></asp:Literal>
                </td>
                <td class="style2">
                    <asp:TextBox ID="Name" runat="server" CssClass="txt" MaxLength="20"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                        ErrorMessage="请输入节点名称" ControlToValidate="Name" Display="None" 
                        SetFocusOnError="True"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td class="style1">
                    <asp:Literal ID="Literal6" runat="server" Text="节点类型："></asp:Literal>
                </td>
                <td class="style2">
                    <asp:RadioButtonList ID="TypeID" runat="server" RepeatDirection="Horizontal">
                    </asp:RadioButtonList>
                </td>
            </tr>
            <tr>
                <td class="style1"><asp:Literal ID="Literal7" runat="server" Text="相关角色："></asp:Literal>
                </td>
                <td class="style2">
                    <asp:TextBox ID="RoleNames" runat="server" Width="186px" CssClass="txt"></asp:TextBox>
                    <asp:HiddenField ID="hidRoleIDs" runat="server" />
                    <asp:HyperLink ID="lnkSelectRole" NavigateUrl="javascript:;" runat="server">选择</asp:HyperLink>
                </td>
            </tr>
            <tr>
                <td class="style1"><asp:Literal ID="Literal8" runat="server" Text="相关用户："></asp:Literal>
                </td>
                <td class="style2">
                    <asp:TextBox ID="UserNames" runat="server" Width="186px" CssClass="txt"></asp:TextBox>
                    <asp:HiddenField ID="hidUserIDs" runat="server" />
                    <asp:HyperLink ID="lnkSelectUser" NavigateUrl="javascript:;"  runat="server">选择</asp:HyperLink>
                </td>
            </tr>
            <tr>
                <td class="style1"><asp:Literal ID="Literal9" runat="server" Text="默认处理人："></asp:Literal>
                </td>
                <td class="style2">
                    <asp:TextBox ID="txtDefaultUserName" runat="server" Width="186px" CssClass="txt"></asp:TextBox>
                    <asp:HiddenField ID="hidDefaultUserID" runat="server" />        
                    <asp:HyperLink ID="lnkSelectDefaultUser" NavigateUrl="javascript:;"  runat="server">选择</asp:HyperLink>       
                </td>
            </tr>
            <tr>
                <td class="style1"><asp:Literal ID="Literal10" runat="server" Text="提交模式："></asp:Literal>
                </td>
                <td class="style2">
                    <asp:CheckBox ID="chkSubmitMode" runat="server" Text="自动" />
                    <span class="style4">
                    <asp:Literal ID="Literal11" runat="server" Text="默认节点："></asp:Literal>
                    <asp:DropDownList ID="DefaultNextNodeID" runat="server">
                    </asp:DropDownList>
                    </span>
                </td>
            </tr>           
            <tr>
                <td class="style1"><asp:Literal ID="Literal12" runat="server" Text="是否并行："></asp:Literal>
                </td>
                <td class="style2">
                    <asp:CheckBox ID="IsParallel" runat="server" Text="是" />
                    <span class="style5">
                    <asp:Literal ID="Literal13" runat="server" Text="并行模式："></asp:Literal>
                    <asp:DropDownList ID="ParallelMode" runat="server">
                    </asp:DropDownList>
                    </span>
                </td>
            </tr>
          
             <tr>
                <td class="style1"><asp:Literal ID="Literal14" runat="server" Text="其它："></asp:Literal>
                </td>
                <td class="style2">
                    <asp:CheckBox ID="AllowAdd" runat="server" Text="可加签" />
                    <asp:CheckBox ID="AllowPass" runat="server" Text="可传阅" />
                    <asp:CheckBox ID="AllowJump" runat="server" Text="可跳签" />
                    <asp:CheckBox ID="AllowBack" runat="server" Text="可退签" />
                </td>
            </tr>
        </table>
    </div>
    <div id='div1' class="tab2_content style3">
        <table cellpadding="0" cellspacing="0" border="0" width="100%">
            <tr>
                <td class="style1">
                    <asp:Literal ID="Literal2" runat="server" Text="图形宽度："></asp:Literal>
                </td>
                <td class="style2">
                    <asp:TextBox ID="Width" runat="server" CssClass="txt"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                        Display="None" ErrorMessage="请输入图形宽度" SetFocusOnError="True" 
                        ControlToValidate="Width"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                        Display="None" ErrorMessage="格式不对，应为数值类型" SetFocusOnError="True" 
                        ControlToValidate="Width" ValidationExpression="\d*\.?\d+"></asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
                <td class="style1">
                    <asp:Literal ID="Literal3" runat="server" Text="图形高度："></asp:Literal>
                </td>
                <td class="style2">
                    <asp:TextBox ID="Height" runat="server" CssClass="txt"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                        Display="None" ErrorMessage="请输入图形高度" ControlToValidate="Height"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" 
                        Display="None" ErrorMessage="格式不对，应为数值类型" SetFocusOnError="True" 
                        ValidationExpression="\d*\.?\d+" ControlToValidate="Height"></asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
                <td class="style1">
                    <asp:Literal ID="Literal4" runat="server" Text="X坐标："></asp:Literal>
                </td>
                <td class="style2">
                    <asp:TextBox ID="Left" runat="server" CssClass="txt"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
                        Display="None" ErrorMessage="请输入X坐标" ControlToValidate="Left"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" 
                        Display="None" ErrorMessage="格式不对，应为数值类型" SetFocusOnError="True" 
                        ControlToValidate="Left" ValidationExpression="\d*\.?\d+"></asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
                <td class="style1">
                    <asp:Literal ID="Literal5" runat="server" Text="Y坐标："></asp:Literal>
                </td>
                <td class="style2">
                    <asp:TextBox ID="Top" runat="server" CssClass="txt"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" 
                        Display="None" ErrorMessage="请输入Y坐标" ControlToValidate="Top"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator4" runat="server" 
                        Display="None" ErrorMessage="格式不对，应为数值类型" SetFocusOnError="True" 
                        ValidationExpression="\d*\.?\d+" ControlToValidate="Top"></asp:RegularExpressionValidator>
                    
                </td>
            </tr>
            
        </table><asp:ValidationSummary ID="ValidationSummary1" runat="server" 
            ShowMessageBox="True" ShowSummary="False" />
    </div>
    </asp:Panel>   

    
    <script type="text/javascript">
        //addEvent();
        //initFirstTab(0);
        setFocus(document.getElementById("lnk_0"));
    </script>

</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
    <asp:Button ID="btnSave" runat="server" Text="保存"
                    onclick="btnSave_Click" />
</asp:Content>
